<?php
    include_once("db_connect.php");
    $postdata = file_get_contents("php://input");
    if(isset($postdata) && !empty($postdata)){
        $request = json_decode($postdata);
        $accesstoken = mysqli_real_escape_string($mysqli, trim($request->accesstoken));

        $sql = "INSERT INTO quality_dowload (username) VALUES ('$accesstoken')";
        if($mysqli->query($sql)){
            $data = array('message' => 'success');
            echo json_encode($data);
        }else{
            $data = array('message'=> 'error');
            echo json_encode($data);
        }
    }
?>